{template header}


{template sidebar}

<!-- artile begin -->
<div class="article">
    <div class="tab">
        <ul>
            <!--{loop $this->tab $k $v}-->
            <li {$k == $type ? ' class="current"' : ''}><a href="{$this->url( $c, null, array( 'type' => $k ) )}">{$v}</a></li>
            <!--{/loop}-->
        </ul>
    </div>


    <!--{if $type == 'myOrder' }-->
    <form class="form-search" action="{$this->url($c, 'search_myorder', $this->get())}">
        <table>
            <tr><td class="td1" width="20%">订单编号：</td>
                <td>

                    <div class="input-append">
                        <input type="text" name="key" class="span2 search-query" placeholder=""请输入出库单号 />
                        <button type="button" class="btn search">搜索</button>
                    </div>
                </td >
            </tr>
        </table>

    </form>
    <table cellpadding="1" cellspacing="1" width="100%" border="0">

        <tr>

            <th width="20%">订单编号</th>
            <th width="20%">宝贝名称</th>
            <th width="20%">订单日期</th>
            <th width="20%">订单状态</th>
            <th width="20%">操作</th>

        </tr>
        <!--{if $result}-->
        <!--{loop $result $t}-->

        <tr>
            <td>{$t['orderNo']}</td>
            <td>{$t['goodsName']}</td>
            <td>{$t['orderDate']}</td>
            <td>{$t['orderStatus']}</td>
            <td class="operate">
                <!--{if  $t['orderStatus'] ==0}-->
                <a href="{$this->url($c,'postGoods',array('orderNo'=>$t['orderNo']))}">发货</a>
                <!--{/if}-->
                <!--{if  $t['orderStatus'] == 1}-->
                <a href="{$this->url($c,'evaluateGoods',array('orderNo'=>$t['orderNo']))}">评论</a>
                <a href="{$this->url($c,'backGoods',array('orderNo'=>$t['orderNo']))}">换货</a>
                <a href="{$this->url($c,'cancelGoods',array('orderNo'=>$t['orderNo']))}">退货</a>
                <!--{/if}-->
                <!--{if  $t['orderStatus'] == 2 || $t['orderStatus'] == 3 ||  $t['orderStatus'] == 4 }-->
                <a href="">无</a>
                <!--{/if}-->
            </td>
        </tr>

        <!--{/loop}-->

        <!--{else}-->
        <tr>

            <td colspan="5">没有数据记录文件！</td>

        </tr>
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="4">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->



    </table>


    <!--{/if}-->


    <!--{if $type == 'orderMan' }-->
    <form class="form-search" action="{$this->url($c, 'search_order', $this->get())}">
        <table>
            <tr><td class="td1" width="20%">出库单号：</td>
                <td>

                    <div class="input-append">
                        <input type="text" name="key" class="span2 search-query" placeholder=""请输入出库单号 />
                        <button type="button" class="btn search">搜索</button>
                    </div>
                </td >
            </tr>
        </table>

    </form>

    <table cellpadding="1" cellspacing="1" width="100%" border="0">
        <tr>

            <th width="20%">订单编号</th>
            <th width="20%">宝贝名称</th>
            <th width="20%">订单日期</th>
            <th width="20%">订单状态</th>

        </tr>
        <!--{if $result}-->
        <!--{loop $result $val}-->

        <tr>
            <td>{$val['orderNo']}</td>
            <td>{$val['goodsName']}</td>
            <td>{$val['orderDate']}</td>
            <td>{$val['orderStatus']}</td>
        </tr>

        <!--{/loop}-->

        <!--{else}-->
        <tr>

            <td colspan="4">没有数据记录文件！</td>

        </tr>
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="4">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <tr>
            <td colspan="4" class="td4">
                <a title="添加订单" class="btn btn-success " href="{$this->url($c,'addOrder')}">添加订单</a>
            </td>
        </tr>

    </table>


    <!--{/if}-->

    <!--{if  $a == 'addOrder' || $a == 'editOrder'}-->
    <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <th colspan="4" class="td2">{$a == 'add' ? '添加' : '修改'}用户</th>
            </tr>
            <!--{if $a == 'add'}-->
            <tr>
                <td class="td1">订单编号：</td>
                <td class="td2" colspan="2"><input type="text" placeholder="请输入订单编号" size="30" name="orderNo" value = "{result['orderNo']}" class="required" /></td>
            </tr>
            <!--{/if}-->



            <tr>
                <td class="td1">淘宝订单号：</td>
                <td class="td2" colspan="3"><input type="text" placeholder="请输入密码" size="30" name="taobaoOrderNo" value = "{$result['taobaoOrderNo']}" class="required" /></td>
            </tr>
            <tr>
                <td class="td1">商品编号：</td>
                <td class="td2" colspan="3"><input type="text" placeholder="请输入商品编号" size="30"   value = "{$result['goodsNo']}" name="goodsNo" />
                    如不需要更改密码，此处请留空</td>
            </tr>
            <tr>
                <td class="td1">买家旺旺ID：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="wwID" value="{$result['wwID ']}" />
                </td>
            </tr>


            <tr>
                <td class="td1">收件地址：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="recvAddr" value="{$result['recvAddr ']}" />
                </td>
            </tr>
            <tr>
                <td class="td1">联系电话：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="phone" value="{$result['phone']}" />
                </td>
            </tr>
            <tr>
                <td class="td1">货号：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="materialNo" value="{$result['materialNo']}" />
                </td>
            </tr>
            <tr>
                <td class="td1">颜色：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="color" value="{$result['color']}" />
                </td>
            </tr>
            <tr>
                <td class="td1">尺寸：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="size" value="{$result['size']}" />
                </td>
            </tr>
            <tr>
                <td class="td1">销售价格：</td>
                <td class="td2" colspan="3">
                    <input type="text" size="30" name="price" value="{$result['price']}" />
                </td>
            </tr>
            <tr>
                <td colspan="2" class="td1">
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if  $a == 'postGoods' }-->
    <form method="post" action="{$this->url($c, 'savePost')}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
           <tr>
                <td class="td1">订单编号：</td>
                <td class="td2" colspan="2"><input type="text" placeholder="请输入订单编号" size="30" name="goodsNo" value = "{$result['orderNo']}" class="required" /></td>
            </tr>
            <tr>
                <td class="td1">物流公司：</td>

                <td class="td2" colspan="2">
                    <input type="text" size="30" name="logisticName" value="{$a == 'edit' ? $result['logisticName'] : ''}" />
                </td>
            </tr>
            <tr>
                <td class="td1">快递单号：</td>
                <td class="td2" colspan="2">
                    <input type="text" size="30" name="logisticNo" value="{$a == 'edit' ? $result['logisticNo'] : ''}" />
                </td>
            </tr>
            <tr>
                <td colspan="1" class="td1">
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if  $a == 'evaluateGoods' }-->
    <form method="post" action="{$this->url($c, 'saveEvaluate', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
           <tr>
                <td class="td1">订单编号：</td>
                <td class="td2" colspan="2"><input type="text" placeholder="请输入订单编号" size="30" name="orderNo" value = "{$result['orderNo']}" class="required" /></td>
            </tr>
            <tr>
                <td class="td1">评价类型：</td>
                <td class="td2" colspan="2">
                    <input type="text" size="30" name="type" value="{$a == 'edit' ? $result['type'] : ''}" />
                </td>
            </tr>
            <tr>
                <td class="td1">评论内容：</td>
                <td class="td2" colspan="2">
                    <textarea name="content" placeholder="请输入SQL语句" cols="50" rows="5" class="required"></textarea>
                </td>
            </tr>

            <tr>
                <td colspan="1" class="td1">
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

    <!--{if  $a == 'backGoods' }-->
    <form method="post" action="{$this->url($c, 'saveBack')}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1">订单编号：</td>
                <td class="td2" colspan="2"><input type="text" placeholder="请输入订单编号" size="30" name="orderNo" value = "{$result['orderNo']}" class="required" /></td>
            </tr>

            <tr>
                <td class="td1">换货原因类型：</td>
                <td class="td2" colspan="2">
                    <input type="text" size="30" name="reason" value="{$a == 'edit' ? $result['reason'] : ''}" />
                </td>
            </tr>
            <tr>
                <td class="td1">换货原因：</td>
                <td class="td2" colspan="2">
                    <textarea name="content" placeholder="请输入原因" cols="50" rows="5" class="required"></textarea>
                </td>
            </tr>

            <tr>
                <td colspan="1" class="td1">
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->
    <!--{if  $a == 'cancelGoods' }-->
    <form method="post" action="{$this->url($c, 'saveCancel', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1">订单编号：</td>
                <td class="td2" colspan="2"><input type="text" placeholder="请输入订单编号" size="30" name="orderNo" value = "{$result['orderNo']}" class="required" /></td>
            </tr>
            <tr>
                <td class="td1">退货原因类型：</td>
                <td class="td2" colspan="2">
                    <input type="text" size="30" name="reason" value="{$a == 'edit' ? $result['reason'] : ''}" />
                </td>
            </tr>
            <tr>
                <td class="td1">退货原因：</td>
                <td class="td2" colspan="2">
                    <textarea name="content" placeholder="请输入退货原因" cols="50" rows="5" class="required"></textarea>
                </td>
            </tr>

            <tr>
                <td colspan="1" class="td1">
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="1" class="td1">
                    <a class="btn btn-success green save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->




</div>
<!-- artile end -->
{template footer}